package za.org.jcicada.genss.lifecycle.impl;

import za.org.jcicada.genss.SystemURN;
import za.org.jcicada.genss.lifecycle.ILifeCycleClient;
import za.org.jcicada.genss.lifecycle.ILifeCycleServer;
import za.org.jcicada.genss.lifecycle.LogLevel;

public class StubLifeCycleServer implements ILifeCycleServer {

	public ILifeCycleClient observer;
	public SystemURN systemURN;
	public LogLevel level;
	public boolean disconnected;
	public boolean halted;
	public boolean pinged;
	public boolean reconnected;
	public boolean restarted;
	
	public void informDisconnect(ILifeCycleClient observer) {
		this.observer = observer;
		disconnected = true;
	}

	public void requestHalt(ILifeCycleClient observer, SystemURN systemURN) {
		this.observer = observer;
		this.systemURN = systemURN;
		halted = true;
	}

	public void requestPing(ILifeCycleClient observer, SystemURN systemURN) {
		this.observer = observer;
		this.systemURN = systemURN;
		pinged = true;
	}

	public void requestReconnect(ILifeCycleClient observer, SystemURN systemURN) {
		this.observer = observer;
		this.systemURN = systemURN;
		reconnected = true;
	}

	public void requestRestart(ILifeCycleClient observer, SystemURN systemURN) {
		this.observer = observer;
		this.systemURN = systemURN;
		restarted = true;
	}

	public void requestSetLogLevel(ILifeCycleClient observer, SystemURN systemURN, LogLevel level) {
		this.observer = observer;
		this.systemURN = systemURN;
		this.level = level;
	}

}
